package com.foreknow.service.impl;

import com.foreknow.bean.User;
import com.foreknow.dao.UserDao;
import com.foreknow.dao.impl.UserDaoImpl;
import com.foreknow.service.UserService;

public class UserServiceImpl implements UserService {
    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void save(User user) {
        userDao.insertUser(user);
    }

    public static void main(String[] args) {
        UserServiceImpl service = new UserServiceImpl();
        service.setUserDao(new UserDaoImpl());
        service.save(new User());
    }
}
